home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-01-11 | 1.9 KB | 61 lines | [TEXT/CWIE] |
- //---------------------------------------------------------------------------------------
- //
- // ExtRoutines.h -- Support routines for creating 4D extensions
- //
- // Copyright ©1995-1996, Pensacola Christian College
- //
- // ======================================================================
- // Change History
- // ======================================================================
- //
- // 1.0 08/ /95 Steve Dwire
- // Initial release
- //
- // 1.1 11/17/95 Steve Dwire
- // Added PostKey code from ACIUS's POSTKEY sample extension.
- //
- //---------------------------------------------------------------------------------------
-
- #ifndef __EXTROUTINES_H__
- #define __EXTROUTINES_H__ 1
-
- #ifndef __EXTERNAL4D__
- #include <Ext4D.h>
- #endif
-
- #if defined(powerc) || WINVER
-
- extern Call4DProcPtr gCall4DAdr;
- #define CALL4D(entryPt,pBlock) Call4D(gCall4DAdr,entryPt,pBlock)
- void InitExtension(PackagePtr params);
- #define LaunchProcess(funcName,resType,resID,stack,procName,procID) \
- LaunchNativeProcess((XPOINTER)(funcName),(SLONG)stack,(UBYTE*)procName,(SLONG*)procID)
- OSErr LaunchNativeProcess (XPOINTER funcName, SLONG stack, UBYTE *procName, SLONG *procID);
-
- #else
-
- #define InitExtension(params)
- #define CALL4D(entryPt,pBlock) Call4D(entryPt,pBlock)
- #define LaunchProcess(funcName,resType,resID,stack,procName,procID) \
- Launch68KProcess(resType,resID,(SLONG)stack,(UBYTE*)procName,(SLONG*)procID)
- OSErr Launch68KProcess (SLONG resType, SLONG resID, SLONG stack, UBYTE *procName, SLONG *procID);
-
- #endif
-
- #define InterProcChar '◊'
-
- SWORD GetResID(OSType bType, OSType rType, SWORD localID);
- //void Pstrcpy(const UBYTE *source, UBYTE *dest);
-
- inline void Pstrcpy(const UBYTE *source, UBYTE *dest)
- {
- short index;
- for(index=0; index<(*source+1); index++)
- *(dest+index) = *(source+index);
-
- //BlockMove(source,dest,(*source)+1);
- }
- void PostKey( unsigned long TheKey, unsigned long TheModifiers, Boolean useAutoKey);
-
- #endif
-